package Work;

import java.util.Scanner;

/**
 * @Author: lu
 * @Date: 2021/8/8 13:48
 * @Description: 打印菜单:
 */
public class Task02 {
    public static void main(String[] args) {
        System.out.println("菜单选项：");
        System.out.println("1.新建 | 2.打开文件 | 3.保存 | 4. 刷新 | 5.退出");
        while(true){
            System.out.println("请输入选项（1-5）：");
            Scanner sc = new Scanner(System.in);
            int num = sc.nextInt();
            switch (num){
                case 1:
                    System.out.println("新建");break;
                case 2:
                    System.out.println("打开文件");break;
                case 3:
                    System.out.println("保存");break;
                case 4:
                    System.out.println("刷新");break;
                case 5:
                    System.out.println("退出");
                    System.exit(0);
                default:
                    System.out.println("输入数字无效");break;
            }
        }

    }
}
